const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true, // 你的其他配置
  devServer: {
    port: 8082,
    open: true,
    // overlay: {
    //   warnings: false,
    //   errors: true
    // },
    // lintOnSave: process.env.NODE_ENV === 'development',
    proxy: {
      '/api': {
        target: process.env.VUE_APP_BASE_API,
        changeOrigin: true,
        pathRewrite: {
          '^/api': 'api'
        }
      },
      '/auth': {
        target: process.env.VUE_APP_BASE_API,
        changeOrigin: true,
        pathRewrite: {
          '^/auth': 'auth'
        }
      },
      '/game': {
        target: process.env.VUE_APP_BASE_API,
        changeOrigin: true,
        pathRewrite: {
          '^/game': 'game'
        }
      },
      '/user': {
        target: process.env.VUE_APP_BASE_API,
        changeOrigin: true,
        pathRewrite: {
          '^/user': 'user'
        }
      }
    }
  }
})
